import 'package:get/get.dart';
import 'package:inmotion_pro/pages/main/controller.dart';
import 'package:inmotion_pro/pages/main/realtime_detail/controller.dart';
import 'package:inmotion_pro/pages/main/vehicle_more/battery_info/controller.dart';
import 'package:inmotion_pro/pages/main/vehicle_setting/controller.dart';
import 'package:inmotion_pro/routes/app_routes.dart';

mixin ControllerMixin {
  // 判断车辆控制器是否已注册
  bool get isRegisteredVehicleController =>
      Get.isRegistered<VehicleController>(tag: AppRoutes.VEHICLE);

  // 判断车辆实时数据控制器是否已注册
  bool get isRegisteredVehicleRealtimeDetailController =>
      Get.isRegistered<VehicleRealtimeDetailController>(
          tag: AppRoutes.VEHICLE_REALTIME_DETAIL);

  // 判断车辆设置控制器是否已注册
  bool get isRegisteredVehicleSettingController =>
      Get.isRegistered<VehicleSettingController>(
          tag: AppRoutes.VEHICLE_SETTING);

  // 判断电池信息控制器是否已注册
  bool get isRegisteredBatteryInfoController =>
      Get.isRegistered<BatteryInfoController>(tag: AppRoutes.BATTERY_INFO);
}
